<?php

namespace App\Http\Resources\Api\Admin;

use Illuminate\Http\Resources\Json\JsonResource;

class AdminRoleResource extends JsonResource
{
    public function toArray($request)
    {
        return [
            'role_id'=>$this->role_id,
            'role_name' => $this->role_name,
            'role_content' => $this->role_content,
            'routes' => AdminRoleRouteResource::collection($this->routes),
            'created_at'=>(string)$this->created_at,
            'updated_at'=>(string)$this->updated_at,
        ];
    }
}
